/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ExampleBean;

import java.util.ArrayList;

/**
 *
 * @author Tran Nguyen Anh Tu
 */
public class ExampleItemList2 {
    private String arrayname;

    public void setArrayname(String arrayname) {
        this.arrayname = arrayname;
    }

    public String getArrayname() {
        return arrayname;
    }
    ArrayList itemlist;
    public ExampleItemList2() {
        itemlist=new ArrayList();
        setArrayname("SÁCH");
    for(int i =0;i<60;i++){
        addItem("Item"+i,(500*i)%50,(6*i)%5,"Author"+i,"Resources/BookCoverImages/img"+i%7+".jpg");
    }
}
    private void addItem(String name, int price, int count, String Author, String path){
        ExampleItem item = new ExampleItem();
        item.setIauthor(Author);
        item.setIcount(count);
        item.setIimagepath(path);
        item.setIname(name);
        item.setIprice(price);
        itemlist.add(item);
    }
    public ArrayList getItemlist(){
        return itemlist;
}

}
